
public class KeCar extends Car{
    private String seat;

    public String getSeat() {
        return seat;
    }

    public void setSeat(String seat) {
        this.seat = seat;
    }

    public KeCar(String num, String brand, double rent, String seat) {
        super(num, brand, rent);
        this.seat = seat;
    }

    //计算客车的租金
    @Override
    public double totalmoney(int days, double rent) {
        if (days>=3){
            return days*rent*0.9;
        }else if (days>=7){
            return days*rent*0.8;
        }else if (days>=30){
            return days*rent*0.7;
        }else if (days>=150){
            return days*rent*0.6;
        }
        return days*rent;
    }
    //重写equals方法
    @Override
    public boolean equals(Car car) {
        return false;
    }
}
